package com.resourcestore.dao;

import java.util.List;

import com.resourcestore.dao.BaseDao;
import com.resourcestore.model.Announce;
import com.resourcestore.utils.tag.Pagination;


public class AnnounceDao extends BaseDao {

	public List<Announce> selectAnnounce(){
		List<Announce> list=this.queryForList("selectAnnounce");
		return list;
	}
	public List<Announce> selectAnnouncePage(Announce announce,Pagination pagination){
		List<Announce> list = this.queryForPage("selectAnnouncePage", announce,pagination);
		return list;
	}
	
	public int queryAnnounceNum(Announce announce) {
		return this.queryNum("selectAnnounceCount", announce);
	}
	
	
	public Announce selectAnnounceById(Announce announce){
		return (Announce)this.queryForObject("selectAnnounceById", announce);
	}
	
	public void insertAnnounce(Announce announce){
		this.insert("insertAnnounce", announce);		
	}
	
	public void updateAnnounce(Announce announce){
		this.update("updateAnnounce", announce);	
	}
	
	public void deleteAnnounce(Announce announce){
		this.delete("deleteAnnounce", announce);
	}
	public void deleteMoreAnnounce(Announce announce){
		this.delete("deleteMoreAnnounce", announce);
	}
}
